package Jogo;

import org.newdawn.slick.Animation;
import org.newdawn.slick.geom.Rectangle;


public class Pedra extends Animation{

	private float x, y = 0;
	String str = "";
	private float velocityY = 2;
	private float velocityX;
	Rectangle boundingBoxPedra;
	private float boundingBoxPedraX;
	private float boundingBoxPedraY;
	int tipoPedra;

	public Pedra (float x, float y){
		super();

		this.setX(x);
		this.setY(y);
		this.velocityY = (float) (1 + (Math.random() * 1));
		boundingBoxPedraX = x;
		boundingBoxPedraY = y;
		boundingBoxPedra = new Rectangle(x, y, 180, 180);
		double sorteio = Math.random();

		if (sorteio < 0.33){
			tipoPedra = 1;
		}
		else if(sorteio < 0.66){
			tipoPedra = 2;
		}
		else{
			tipoPedra = 3;
		}

	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public float getVelocityX() {
		return velocityX;
	}

	public void setVelocityX(float velocityX) {
		this.velocityX = velocityX;
	}

	public float getVelocityY(){
		return velocityY;
	}

	public void setVelocityY(float velocityY){
		this.velocityY = velocityY;
	}

	public float getBoundingBoxPedraX() {
		return boundingBoxPedraX;
	}

	public float getBoundingBoxPedraY() {
		return boundingBoxPedraY;
	}

	public void setBoundingBoxPedraX(float boundingBoxPedraX) {
		this.boundingBoxPedraX = boundingBoxPedraX;
	}

	public void setBoundingBoxPedraY(float boundingBoxPedraY) {
		this.boundingBoxPedraY = boundingBoxPedraY;
	}

	public void updatePedra(){
		this.y += this.velocityY;
		this.x += this.velocityX;
		this.boundingBoxPedraY = this.y;
		this.boundingBoxPedraX = this.x;
	}





}